home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000046_fdc@columbia.edu_Fri Feb 4 12:37:00 2005.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!not-for-mail
From: Frank da Cruz <fdc@columbia.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Terminating a telnet session
Date: 4 Feb 2005 17:36:25 GMT
Organization: Columbia University
Lines: 44
Message-ID: <slrnd07ckp.4i8.fdc@sesame.cc.columbia.edu>
References: <ctupi6$uru$1@lust.ihug.co.nz>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1107538585 15616 128.59.59.56 (4 Feb 2005 17:36:25 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 4 Feb 2005 17:36:25 GMT
User-Agent: slrn/0.9.8.0 (SunOS)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15281
On 2005-02-04, Matthew Walker <m.g.walker@NOmassey.SPac.AMnz> wrote:
: I'm trying to nicely/cleanly terminate a telnet session, but I'm unsure
: how to do this with c-kermit 8.0.209.
:
: I'm polling a telnet server every five minutes, and have discovered
: that after a few hours the server doesn't take any more connections. I
: suspect that's because I was just closing each connection, rather than
: using the server's "logoff" command.
:
Telnet are supposed automatically log out a session if it closed from the
client end, and free up any resources, such as pseudoterminals. Often
the reason for inability to create a new session is the ptys are all used
up, which could be the fault of the Telnet server. If explicitly logging
out on the server side fixes the problem, good.
: I've added a logoff command to my script. My first problem is that
: even if I wait for the "Logging off." text from the server, kermit
: still closes the connection before the server closes its end.
:
Instead of waiting for text, you can wait for the connection to be closed.
Example:
lineout logoff # Send "logoff"
for \%i 10 1 -1 { # Wait 10 sec for connection to close
if not open connection break # This is the test
xecho " \%i" # Still open - count down
}
echo
if open connection { # If still open close it from client.
echo Connection still not closed - closing it now.
close connection
}
: In an attempt to fix that problem, I added a "bye" command at the very
: end of the script. However, now the "bye" command fails (I assume)
: because the connection has closed by the time the "bye" is executed.
:
No, it's because you don't have a Kermit server on the far end. BYE
sends a particular kind of Kermit protocol packet. You probably should
have a manual where you can look up the commands:
http://www.columbia.edu/kermit/ck60manual.html
- Frank